﻿{template header}

{template sidebar}

<!-- artile begin -->
<div class="article">



<div class="tab">
    <ul>
        <!--{loop $this->tab $k $v}-->
        <li{$k == $type ? ' class="current"' : ''}><a href="{$this->url( $c, null, array( 'type' => $k ) )}">{$v}</a></li>
        <!--{/loop}-->
    </ul>
</div>


<!--{if $type ==  'addrManage'}-->
<table cellpadding="1" cellspacing="1" border="0" width="100%">


    <tr>
        <td class="td1" width="30%">请选择地址类型：</td>
        <td class="td2" colspan="2">
            <!-- class="required" 必填字段  -->
            <!--  <input type="text" name="discount" placeholder="请输入供货商折扣信息" value="{$a == 'edit' ? $result['discount'] : ''}" />  -->
            <select name="materialType">
                <option value="1">QQ群</option>
                <option value="2">论坛</option>
                <option value="3">博客</option>
                <option value="4">网站</option>
            </select>

        </td>
        <td><a title="查询" class="btn btn-success save" href="{$this->url($c)}">查询</a></td>
    </tr>

    <tr>
        <th width="15%">地址编号</th>
        <th width="15%">地址名称</th>
        <th width="20%">地址类型</th>
        <th width="15%">URL地址</th>
        <th width="15%">操作</th>
    </tr>

    <!--{if $result}-->
    <!--{loop $result $v}-->
    <tr>
        <td><input type="checkbox" name="id" value="{$v['id']}" /></td>
        <td>{$v['id']}</td>
        <td>{$v['addrName']}</td>
        <td>{$v['addrType ']}</td>
        <td>{$v['urlAddr']}</td>
        <td class="operate">
            <a href="{$this->url($c,'look',array('id'=>$v['id']))}">查看</a>
            <a href="{$this->url($c,'delete',array('id'=>$v['id']))}">删除</a>
        </td>
    </tr>
    <!--{/loop}-->
    <!--{/if}-->

    <!--{if $pager}-->
    <!--分页开始-->
    <tr>
        <td colspan="6">
            <div class="page">{$pager}</div>
        </td>
    </tr>
    <!--分页结束-->
    <!--{/if}-->

    <!--{if $result == 0}-->
    <tr>
        <td colspan="4">没有数据记录！</td>
    </tr>
    <!--{/if}-->


    <tr>
        <td colspan="4" class="td4">
            <a title="添加推广地址" class="btn btn-success " href="{$this->url($c,'addInfoPromotionAddr')}">添加推广地址</a>
        </td>
    </tr>


</table>
<!--{/if}-->


<!--{if $a ==  'addInfoPromotionAddr' || $a == 'editInfoPromotionAddr'}-->
<form method="post" action="{$this->url($c, 'savePromotionAddr', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <td class="td1" width="30%">地址编号：</td>
            <td class="td2">
                <!-- class="required" 必填字段  -->
                <input type="text" size="20" name="id" placeholder="请输入地址编号" class="required" value="{$a == 'editInfoPromotionAddr' ? $result['id'] : ''}" />

            </td>
            <td class="td1" width="30%">地址名称：</td>
            <td class="td2">
                <!-- class="required" 必填字段  -->
                <input type="text" size="20" name="addrName" placeholder="请输入地址名称" class="required" value="{$a == 'editInfoPromotionAddr' ? $result['addrName'] : ''}" />

            </td>
        </tr>
        <tr>
            <td class="td1" width="30%">地址类型：</td>
            <td class="td2">
                <select name="addrType">
                    <option value="1">QQ群</option>
                    <option value="2">论坛</option>
                    <option value="3">博客</option>
                    <option value="4">网站</option>
                </select>
            </td>
            <td class="td1" width="30%">URL地址：</td>
            <td class="td2">
                <!-- class="required" 必填字段  -->
                <input type="text" size="20" name="urlAddr" placeholder="" class="required" value="{$a == 'editInfoPromotionAddr' ? $result['urlAddr'] : ''}" />

            </td>

        </tr>
        <tr>
            <td class="td1" width="30%">帐号：</td>
            <td class="td2">
                <!-- class="required" 必填字段  -->
                <input type="text" size="20" name="userId" placeholder="请输入地址类型" class="required" value="{$a == 'editInfoPromotionAddr' ? $result['userId'] : ''}" />

            </td>
            <td class="td1" width="30%">密码：</td>
            <td class="td2">
                <!-- class="required" 必填字段  -->
                <input type="text" size="20" name="userPass" placeholder="" class="required" value="{$a == 'editInfoPromotionAddr' ? $result['userPass'] : ''}" />

            </td>

        </tr>

        <tr>
            <td colspan="2" class="td4">
                <a class="btn btn-success save" href="{$this->url($c)}">保存</a>
            </td>
            <td colspan="2" class="td4">
                <a class="btn btn-success save" href="{$this->url($c)}">重置</a>
            </td>
        </tr>

    </table>
</form>
<!--{/if}-->

<!--{if $type ==  'issueTask'}-->
<table cellpadding="1" cellspacing="1" border="0" width="100%">
    <tr>
        <td class="td1" width="30%">任务名称：</td>
        <td class="td2" colspan="2">
            <!-- class="required" 必填字段  -->
          <input type="text" name="discount" placeholder="请输入任务名称" value="{$a == 'edit' ? $result['discount'] : ''}" />

        </td>
        <td><a title="查询" class="btn btn-success save" href="{$this->url($c)}">查询</a></td>
    </tr>

    <tr>
        <th width="30%">任务编号</th>
        <th width="15%">任务名称</th>
        <th width="20%">发布时间</th>
        <th width="15%">当前状态</th>

    </tr>

    <!--{if $result}-->
    <!--{loop $result $v}-->
    <tr>
        <td><input type="checkbox" name="id" value="{$v['id']}" /></td>
        <td>{$v['title']}</td>
        <td>{$v['type']}</td>
        <td>{$v['url']}</td>
        <td>{$v['address']}</td>
        <td class="operate"><a href="">删除</a></td>
    </tr>
    <!--{/loop}-->
    <!--{/if}-->

    <!--{if $pager}-->
    <!--分页开始-->
    <tr>
        <td colspan="6">
            <div class="page">{$pager}</div>
        </td>
    </tr>
    <!--分页结束-->
    <!--{/if}-->

    <!--{if $result == 0}-->
    <tr>
        <td colspan="4">没有数据记录！</td>
    </tr>
    <!--{/if}-->


    <tr>
        <td colspan="4" class="td4">
            <a title="任务发布" class="btn btn-success " href="{$this->url($c,'issueTask')}">发布任务</a>
        </td>
    </tr>
</table>

<!--{/if}-->

<!--{if $a ==  'issueTask' || $a == 'editTaskInfo'}-->
<form method="post" action="{$this->url($c, 'saveTaskInfo', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" border="0" width="100%">
        <tr>
            <td class="td1" width="30%">任务编号：</td>
            <td class="td2">
                <!-- class="required" 必填字段  -->
                <input type="text" size="20" name="id" placeholder="请输入任务编号" class="required" value="{$a == 'editTaskInfo' ? $result['id'] : ''}" />
                <a format="YmdHis" class="sn" href="{$this->url($c)}">自动生成</a>
            </td>
        </tr>
        <tr>
            <td class="td1" width="30%">任务名称：</td>
            <td class="td2">
                <!-- class="required" 必填字段  -->
                <input type="text" size="20" name="taskName" placeholder="请输入地址名称" class="required" value="{$a == 'editTaskInfo' ? $result['taskName'] : ''}" />

            </td>
        </tr>
        <tr>
            <td class="td1" width="30%">添加地址：</td>
            <td class="td2">
                <!-- class="required" 必填字段  -->
                <input type="text" size="20" name="urlAddr" placeholder="请输入地址类型" class="required" value="{$a == 'editTaskInfo' ? $result['urlAddr'] : ''}" />

            </td>
        </tr>
        <tr>
            <td class="td1" width="30%">添加任务接收人：</td>
            <td class="td2">
                <!-- class="required" 必填字段  -->
                <input type="text" size="20" name="taskReceiver" placeholder="" class="required" value="{$a == 'editTaskInfo' ? $result['taskReceiver'] : ''}" />
            </td>

        </tr>

        <tr>
            <td class="td1" width="30%">信息内容：</td>
            <td class="td2">
                <textarea name="comment" placeholder="请输入SQL语句" cols="50" rows="5" class="required"></textarea>
            </td>
        </tr>

        {template upload}

        <tr>
            <td colspan="1" class="td1">
                <a class="btn btn-success save" href="{$this->url($c)}">保存</a>
            </td>
            <td colspan="1" class="td1">
                <a class="btn btn-success save" href="{$this->url($c)}">重置</a>
            </td>
        </tr>

    </table>
</form>
<!--{/if}-->






</div>
<!-- artile end -->
{template footer}